
package com.michale.admin.controller.tool;

import io.swagger.annotations.Api;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author Michale
 * @apiNote swagger系统接口
 */
@Api(tags = "系统接口")
@Controller
@RequestMapping("/tool/swagger")
public class SwaggerController extends BaseController {

    /**
     * 获取swagger页面
     *
     * @return swagger页面
     */
    @GetMapping("/swagger")
    @PreAuthorize("@security.isPermission('tool:swagger:view')")
    public String generator() {
        return redirect("http://localhost:8080/swagger-ui/index.html");
    }
}
